#include <iostream>

using namespace std;

class A
{
    public:
        A(int tmp = 0)
            :a(tmp)
        {}  

        void print()
        {   
            cout << a << endl;
        }   
    private:
        int a;
};

int main()
{
    A tmp;
    A* p = &tmp;
    *(int*)p = 5;

    p->print();

    return 0;
}
